<template>
	<view class="cooperation-unit-container">
		<view class="cover-wrapper">
			<text class="sub-height cover_bg">封面</text>
			<view class="body">
				<image src="../../static/images/certificate/img_1.png" mode="aspectFit"></image>
			</view>
		</view>
		<view class="home-wrapper">
			<text class="sub-height home_bg">首页</text>
			<view class="body shadow level">
				<view class="box_bg_white">
					<view class="body_top">
						<view class="info-wrapper">
							<view class="info-item">
								<text class="label">持证人姓名：</text>
								<text class="value">张三</text>
							</view>
							<view class="info-item">
								<text class="label">身份证号码：</text>
								<text class="value">411425198906234125</text>
							</view>
							<view class="info-item">
								<text class="label">紧急联系人：</text>
								<text class="value">张三丰</text>
							</view>
							<view class="info-item">
								<text class="label">证号：</text>
								<text class="value">（2020）粤（027）001号</text>
							</view>
							<view class="info-item">
								<text class="label">二维码：</text>
								<text class="value"></text>
							</view>
						</view>
						<view class="avatar-wapper">
							<image src="../../static/images/certificate/avatar.png" mode="aspectFill"></image>
							<text class="avatar-text">二寸兔冠照片</text>
						</view>
					</view>
					<view class="body-bottom">
						<view class="qrCode-wrapper">
							<image src="../../static/images/certificate/qrCode.png" mode=""></image>
						</view>
						<view class="seal-wrapper">
							<image src="../../static/images/certificate/seal.png" mode=""></image>
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="current-wrapper">
			<text class="sub-height current_bg">此页</text>
			<view class="body shadow">
				<image src="../../static/images/certificate/img_2.png" mode="aspectFit"></image>
			</view>
		</view>
		<view class="next-wrapper">
			<text class="sub-height next_bg">续页</text>
			<view class="body shadow">
				<image src="../../static/images/certificate/img_3.png" mode="aspectFit"></image>
			</view>
		</view>
		<view class="foot-wrapper ">
			<text class="sub-height foot_bg">尾页</text>
			<view class="body shadow level">
				<view class="box_bg_white">
					<image src="../../static/images/certificate/img_4.png" mode="aspectFit"></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			};
		}
	}
</script>

<style lang="scss">
	.cooperation-unit-container {
		line-height: 1;

		.sub-height {
			display: inline-block;
			width: 100%;
			text-align: center;
			font-size: 28rpx;
			padding: 20rpx 0;

			&.cover_bg {
				color: #81c7e4;
				background-color: #e8f8ff;
			}

			&.home_bg {
				color: #80a2cc;
				background-color: #e4f0fd;
			}

			&.current_bg {
				color: #71bfdf;
				background-color: #e6f8ff;
			}

			&.next_bg {
				color: #c57a70;
				background-color: #ffeae7;
			}

			&.foot_bg {
				color: #7ea1cb;
				background-color: #e4f0fd;
			}
		}

		.body {
			padding: 20rpx;
			margin: 5%;

			&.shadow {
				width: calc(90% - 40rpx);
				box-shadow: 0 0 8rpx 10rpx #ececec;
				border-radius: 20rpx;
			}

			image {
				width: 100%;
			}

			.body_top {
				display: flex;
				justify-content: space-between;
				padding-top: 20rpx;

				.info-wrapper {
					.info-item {
						font-size: 28rpx;
						line-height: 3;
						color: #787878;
					}
				}

				.avatar-wapper {
					display: flex;
					flex-direction: column;
					align-items: center;

					image {
						width: 150rpx;
						height: 180rpx;
					}

					.avatar-text {
						color: #d6d6d6;
						font-size: 26rpx;
					}
				}
			}

			.body-bottom {
				width: 100%;
				display: flex;
				justify-content: space-between;

				.qrCode-wrapper,
				.seal-wrapper {
					image {
						width: 150rpx;
						height: 150rpx;
					}
				}

				.seal-wrapper {
					transform: translate(-20%, -40%);
				}
			}

			// 叠级效果
			&.level {
				position: relative;
				display: flex;
				flex-direction: column;
				align-items: center;
				margin-bottom: 60rpx;

				&::after,
				&::before {
					content: "";
					display: inline-block;
					position: absolute;
					height: 60%;
					border-radius: 20rpx;
				}

				&::after {
					width: calc(100% - 20rpx);
					background-color: #e3ecf6;
					bottom: -15rpx;
					z-index: -2;
				}

				&::before {
					width: calc(100% - 30rpx);
					background-color: #eff4fd;
					bottom: -25rpx;
					z-index: -9;
				}
			}

			.box_bg_white {
				height: 100%;
				width: 100%;
				background-color: white;
				position: relative;

				&::after {
					content: "";
					display: inline-block;
					position: absolute;
					width: calc(100% + 40rpx);
					height: 60%;
					left: -20rpx;
					bottom: -20rpx;
					background-color: #FFFFFF;
					z-index: -1;
				}
			}
		}
	}
</style>
